<script setup lang="tsx">
import { locales, handleSetLanguage } from '@/i18n'

const handleGo = (arg) => {
  handleSetLanguage(arg)
}
</script>

<template>
  <div>
    {{ $t('i18n') }}
  </div>
  <div>
    <div v-for="item,key in locales">
      {{ item.name }} {{ item.flags }} <a href="javascript:;" @click="handleGo(key)">GO</a>
    </div>
  </div>
</template>